package com.example.crm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.crm.entity.CustomerCategory;
import com.example.crm.mapper.CustomerCategoryMapper;
import com.example.crm.service.CustomerCategoryService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 客户分类服务实现类
 */
@Service
public class CustomerCategoryServiceImpl extends ServiceImpl<CustomerCategoryMapper, CustomerCategory> implements CustomerCategoryService {

    @Override
    public List<CustomerCategory> listAllCategories() {
        LambdaQueryWrapper<CustomerCategory> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.orderByAsc(CustomerCategory::getName);
        return list(queryWrapper);
    }
} 